// FunctionAssembler.h: interface for the FunctionAssembler class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_FUNCTIONASSEMBLER_H__E4B457F8_F4CE_497B_B0EA_864E1FC8C0D2__INCLUDED_)
#define AFX_FUNCTIONASSEMBLER_H__E4B457F8_F4CE_497B_B0EA_864E1FC8C0D2__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Map.h"

namespace pa
{
	class FunctionObjectFactory;
	class FunctionSelectFactory;
	class FunctionContainer;
	class DllExport FunctionAssembler  
	{
	private:
		FunctionAssembler(FunctionObjectFactory* pObjectFactory,FunctionSelectFactory* pSelectFactory);
	public:
		virtual ~FunctionAssembler();

	public:
		static FunctionAssembler* Instance();

	public:
		FunctionContainer& GetFunctionContainer(const StdString& strOwnerID,const StdString& strTable,const StdString& strSource);
		FunctionContainer& GetFunctionContainer(int strOwnerID,const StdString& strTable,const StdString& strSource);
		FunctionContainer* FindFunctionContainer(const StdString& strKey);
		StdString GenerateKey(const StdString& strOwnerID,const StdString& strTable,const StdString& strSource);
		FunctionContainer* NewFunctionContainer(const StdString& strOwnerID,const StdString& strTable,const StdString& strSource);
		FunctionContainer* NewFunctionContainer(int strOwnerID,const StdString& strTable,const StdString& strSource);
		void AddFunctionContainer(const StdString& strKey,FunctionContainer* pFunContainer);
		


	private:

		FunctionObjectFactory* pObject;
		FunctionSelectFactory* pSelect;

	private:

		CMap<StdString,StdString,FunctionContainer*,FunctionContainer*> m_theFunContainerArr;


	};

	


};
#endif // !defined(AFX_FUNCTIONASSEMBLER_H__E4B457F8_F4CE_497B_B0EA_864E1FC8C0D2__INCLUDED_)
